package com.site.blog.my.core.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Hujf
 * @title: myController
 * @date 2021/4/820:23
 * @description: TODO
 */
@Controller
public class myController {

    @PostMapping("/my")
    public void t(HttpServletRequest request){
        String[] favorites = request.getParameterValues("favorite");
        System.out.println(favorites);
    }

    @GetMapping("/my")
    public String t2(HttpServletRequest request){
        return "admin/my";
    }
}
